package com.settlement.system.controller;

import com.settlement.system.common.exception.ServiceException;
import com.settlement.system.model.entity.common.ResetWpAudit;
import com.settlement.system.service.IBaseService;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author
 */
@Api(tags = "唯品稽核明细静态数据", description = "唯品稽核明细静态数据")
@RestController
@RequestMapping("/wp/audit/static")
public class WpAuditStaticReportController extends ExcelController<ResetWpAudit> {

    /*@Reference(version = "${dubbo.acs.api.version}", timeout = 6000, async = true)
    private StaticReportApi staticReportApi;*/

    @Override
    public Class<?> getModelClass() {
        return ResetWpAudit.class;
    }

    @Override
    public IBaseService init() {
        return null;
    }

    @Override
    protected void saveData(List<ResetWpAudit> datas) throws ServiceException {
        try {
            for (ResetWpAudit audit : datas) {
                /*staticReportApi.resetWpAuditStaticReport(audit.getShopNo(),
                        audit.getPoNo(), audit.getBarcode());*/
            }
        } catch (Exception ex) {
            throw new ServiceException(ex.getMessage(), ex);
        }
    }
}
